package org.example.listener;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "cloud3",consumerGroup = "rocket-producer-group",messageModel = MessageModel.CLUSTERING
,selectorType = SelectorType.TAG,selectorExpression = "tagA || tagC",maxReconsumeTimes = 2)
public class ConsumerListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println(s);
        int i=1/0;
    }
}
